package com.itheima.service.impl;

import com.itheima.pojo.User;
import com.itheima.service.UserService;
import org.springframework.stereotype.Component;

/**
 * @Author weizhongli
 * @Date 2020/4/27
 * @Version v1.0
 * @Description  服务降级的处理类
 *              写的是服务降级的处理方法
 *              必须注入到Spring容器中
 **/
@Component //注入到Spring容器中
public class UserServiceImpl implements UserService {
    @Override
    public User findUserById(Integer id) {
        User user = new User();
        user.setId(id);
        user.setName("默认熔断方法");
        return user;
    }
}
